package main

import "fmt"

type CCStatusInfo struct {
	Status   *int        `json:"cc_status"`
	Current  *CCVersiondInfo `json:"current"`
	Previous *CCVersiondInfo `json:"previous"`
	Next     *CCVersiondInfo `json:"Next"`
}

type CCVersiondInfo struct {
	ChName              string   `json:"ch_name"`
	CcName              string   `json:"cc_name"`
}

func main() {
	var payload CCVersiondInfo
	payload.CcName = "example"
	payload.ChName = "mychannel"

	change(&payload)

	var cc CCStatusInfo
	cc.Current = &payload

	fmt.Println(cc.Current)

	var peerMap map[string]*CCStatusInfo
	fmt.Println(peerMap["aaa"])

	test()
}

func change(info *CCVersiondInfo)  {
	info.ChName = "change"
}

var a *int

func test() {
	_a := 1
	a = &_a
	_b := 2
	b := &_b
	var payload CCStatusInfo
	payload.Status = a
	payload.Status = b
	fmt.Println(a)
	fmt.Println(b)
	payload.Update()
	fmt.Println(payload.Status)
}

func (c *CCStatusInfo) Update() {
	_c := 3
	c.Status = &_c
}